package com.maxus.mini.entity.topic;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.maxus.mini.common.VersionedAuditableIdEntity;
import com.maxus.mini.entity.lib.Lib;

/**
 * 话题项
 * 
 * @author wujinsong
 *
 */
@Entity
@Table(name = "ex_topic_item")
public class TopicItem extends VersionedAuditableIdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2289942401582743917L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Override
	public Long getId() {
		return id;
	}
	
	/**
	 * 话题
	 */
	private Topic topic;
	
	/**
	 * 资源
	 */
	private Lib lib;
	
	/**
	 * 排序
	 */
	private int seq;
	
	/**
	 * 介绍
	 */
	private String intro;

	@ManyToOne()
	@JoinColumn(name = "tid")
	public Topic getTopic() {
		return topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}

	@ManyToOne()
	@JoinColumn(name = "rid")
	public Lib getLib() {
		return lib;
	}

	public void setLib(Lib lib) {
		this.lib = lib;
	}

	public int getSeq() {
		return seq;
	}

	public void setSeq(int seq) {
		this.seq = seq;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}
}
